3.134 \(\int \cot ^5(e+f x) (a+a \sin (e+f x))^m \, dx\)

Optimal. Leaf size=123 \[ -\frac{\left (m^2-9 m+12\right ) (a \sin (e+f x)+a)^{m+3} \, _2F_1(3,m+3;m+4;\sin (e+f x)+1)}{12 a^3 f (m+3)}-\frac{\csc ^4(e+f x) (a \sin (e+f x)+a)^{m+3}}{4 a^3 f}+\frac{(9-m) \csc ^3(e+f x) (a \sin (e+f x)+a)^{m+3}}{12 a^3 f} \]

[Out]

((9 - m)*Csc[e + f*x]^3*(a + a*Sin[e + f*x])^(3 + m))/(12*a^3*f) - (Csc[e + f*x]^4*(a + a*Sin[e + f*x])^(3 + m
))/(4*a^3*f) - ((12 - 9*m + m^2)*Hypergeometric2F1[3, 3 + m, 4 + m, 1 + Sin[e + f*x]]*(a + a*Sin[e + f*x])^(3
+ m))/(12*a^3*f*(3 + m))

________________________________________________________________________________________

Rubi [A]  time = 0.0982222, antiderivative size = 123, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.19, Rules used = {2707, 89, 78, 65} \[ -\frac{\left (m^2-9 m+12\right ) (a \sin (e+f x)+a)^{m+3} \, _2F_1(3,m+3;m+4;\sin (e+f x)+1)}{12 a^3 f (m+3)}-\frac{\csc ^4(e+f x) (a \sin (e+f x)+a)^{m+3}}{4 a^3 f}+\frac{(9-m) \csc ^3(e+f x) (a \sin (e+f x)+a)^{m+3}}{12 a^3 f} \]

Antiderivative was successfully verified.

[In]

Int[Cot[e + f*x]^5*(a + a*Sin[e + f*x])^m,x]

[Out]

((9 - m)*Csc[e + f*x]^3*(a + a*Sin[e + f*x])^(3 + m))/(12*a^3*f) - (Csc[e + f*x]^4*(a + a*Sin[e + f*x])^(3 + m
))/(4*a^3*f) - ((12 - 9*m + m^2)*Hypergeometric2F1[3, 3 + m, 4 + m, 1 + Sin[e + f*x]]*(a + a*Sin[e + f*x])^(3
+ m))/(12*a^3*f*(3 + m))

Rule 2707

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p_.), x_Symbol] :> Dist[1/f, Subst[I
nt[(x^p*(a + x)^(m - (p + 1)/2))/(a - x)^((p + 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x]
&& EqQ[a^2 - b^2, 0] && IntegerQ[(p + 1)/2]

Rule 89

Int[((a_.) + (b_.)*(x_))^2*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[((b*c - a*
d)^2*(c + d*x)^(n + 1)*(e + f*x)^(p + 1))/(d^2*(d*e - c*f)*(n + 1)), x] - Dist[1/(d^2*(d*e - c*f)*(n + 1)), In
t[(c + d*x)^(n + 1)*(e + f*x)^p*Simp[a^2*d^2*f*(n + p + 2) + b^2*c*(d*e*(n + 1) + c*f*(p + 1)) - 2*a*b*d*(d*e*
(n + 1) + c*f*(p + 1)) - b^2*d*(d*e - c*f)*(n + 1)*x, x], x], x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && (LtQ
[n, -1] || (EqQ[n + p + 3, 0] && NeQ[n, -1] && (SumSimplerQ[n, 1] ||  !SumSimplerQ[p, 1])))

Rule 78

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> -Simp[((b*e - a*f
)*(c + d*x)^(n + 1)*(e + f*x)^(p + 1))/(f*(p + 1)*(c*f - d*e)), x] - Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1)
+ c*f*(p + 1)))/(f*(p + 1)*(c*f - d*e)), Int[(c + d*x)^n*(e + f*x)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e, f,
 n}, x] && LtQ[p, -1] && ( !LtQ[n, -1] || IntegerQ[p] ||  !(IntegerQ[n] ||  !(EqQ[e, 0] ||  !(EqQ[c, 0] || LtQ
[p, n]))))

Rule 65

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((c + d*x)^(n + 1)*Hypergeometric2F1[-m, n +
 1, n + 2, 1 + (d*x)/c])/(d*(n + 1)*(-(d/(b*c)))^m), x] /; FreeQ[{b, c, d, m, n}, x] &&  !IntegerQ[n] && (Inte
gerQ[m] || GtQ[-(d/(b*c)), 0])

Rubi steps

\begin{align*} \int \cot ^5(e+f x) (a+a \sin (e+f x))^m \, dx &=\frac{\operatorname{Subst}\left (\int \frac{(a-x)^2 (a+x)^{2+m}}{x^5} \, dx,x,a \sin (e+f x)\right )}{f}\\ &=-\frac{\csc ^4(e+f x) (a+a \sin (e+f x))^{3+m}}{4 a^3 f}+\frac{\operatorname{Subst}\left (\int \frac{(a+x)^{2+m} \left (-a^2 (9-m)+4 a x\right )}{x^4} \, dx,x,a \sin (e+f x)\right )}{4 a f}\\ &=\frac{(9-m) \csc ^3(e+f x) (a+a \sin (e+f x))^{3+m}}{12 a^3 f}-\frac{\csc ^4(e+f x) (a+a \sin (e+f x))^{3+m}}{4 a^3 f}+\frac{\left (12 a^2-a^2 (9-m) m\right ) \operatorname{Subst}\left (\int \frac{(a+x)^{2+m}}{x^3} \, dx,x,a \sin (e+f x)\right )}{12 a^2 f}\\ &=\frac{(9-m) \csc ^3(e+f x) (a+a \sin (e+f x))^{3+m}}{12 a^3 f}-\frac{\csc ^4(e+f x) (a+a \sin (e+f x))^{3+m}}{4 a^3 f}-\frac{(12-(9-m) m) \, _2F_1(3,3+m;4+m;1+\sin (e+f x)) (a+a \sin (e+f x))^{3+m}}{12 a^3 f (3+m)}\\ \end{align*}

Mathematica [A]  time = 0.274734, size = 83, normalized size = 0.67 \[ -\frac{(\sin (e+f x)+1)^3 (a (\sin (e+f x)+1))^m \left (\left (m^2-9 m+12\right ) \, _2F_1(3,m+3;m+4;\sin (e+f x)+1)+(m+3) \csc ^3(e+f x) (3 \csc (e+f x)+m-9)\right )}{12 f (m+3)} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[e + f*x]^5*(a + a*Sin[e + f*x])^m,x]

[Out]

-(((3 + m)*Csc[e + f*x]^3*(-9 + m + 3*Csc[e + f*x]) + (12 - 9*m + m^2)*Hypergeometric2F1[3, 3 + m, 4 + m, 1 +
Sin[e + f*x]])*(1 + Sin[e + f*x])^3*(a*(1 + Sin[e + f*x]))^m)/(12*f*(3 + m))

________________________________________________________________________________________

Maple [F]  time = 0.352, size = 0, normalized size = 0. \begin{align*} \int \left ( \cot \left ( fx+e \right ) \right ) ^{5} \left ( a+a\sin \left ( fx+e \right ) \right ) ^{m}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(f*x+e)^5*(a+a*sin(f*x+e))^m,x)

[Out]

int(cot(f*x+e)^5*(a+a*sin(f*x+e))^m,x)

________________________________________________________________________________________

Maxima [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^5*(a+a*sin(f*x+e))^m,x, algorithm="maxima")

[Out]

Timed out

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left ({\left (a \sin \left (f x + e\right ) + a\right )}^{m} \cot \left (f x + e\right )^{5}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^5*(a+a*sin(f*x+e))^m,x, algorithm="fricas")

[Out]

integral((a*sin(f*x + e) + a)^m*cot(f*x + e)^5, x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)**5*(a+a*sin(f*x+e))**m,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (a \sin \left (f x + e\right ) + a\right )}^{m} \cot \left (f x + e\right )^{5}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^5*(a+a*sin(f*x+e))^m,x, algorithm="giac")

[Out]

integrate((a*sin(f*x + e) + a)^m*cot(f*x + e)^5, x)